package com.qitancai.huazistudentmanagement.dao;

import com.qitancai.huazistudentmanagement.entity.Student;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @InterfaceName StudentRepository
 * @Description TODO
 * @Author freaks
 * @Date 2021/6/22 2:59
 **/

public interface StudentRepository extends JpaRepository<Student, String>, JpaSpecificationExecutor<Student> {
    /**
     * @description 通过学生姓名进行模糊查询并分页
     * @param name 学生姓名
     * @param pageable 分页接口
     * @return 学生信息查询结果
     **/
    Page<Student> findByNameContaining(String name, Pageable pageable);

}
